<div id="${id}" name="${id}" style="text-align: center">
    <div style="display: flex;padding: 8px;border-bottom: 2px solid #FF7E00;color: #666a73;">
        <span style="flex: 1;">操作诊所</span>
        <span style="flex: 1.5;">首次开单时间</span>
        <span style="flex: 1.5;">开单时间</span>
        <span style="flex: 1;">账单状态</span>
        <span style="flex: 1;">医生</span>
        <span style="flex: 1;">TC</span>
        <span style="flex: 1;">本次缴费</span>
        <span style="flex: 1;">备注</span>
        <span style="flex: 1;">操作</span>
    </div>
    @for(item in list){
    <p style="display: none" value="${item.getTime}">${item.getTime}</p>
    <p style="display: none" value="${item.operationTime}">${item.operationTime}</p>
    <div>
        <div style="display: flex;padding: 8px;border-bottom: 1px solid #FF7E00;position: relative;">
            <span style="flex: 1;">${item.outpatientName}</span>
            <span style="flex: 1.5;">${item.operationTime}</span>
            <span style="flex: 1.5;">${item.getTime}</span>
            <span style="flex: 1;">${item.dealStatus}</span>
            <span style="flex: 1;">${item.doctor}</span>
            <span style="flex: 1;">${item.tcName}</span>
            <span style="flex: 1;" >${item.serviceActualPay}</span>
            <span style="flex: 1;" class="beyond" title="${item.remarks}">${item.remarks}</span>
            <span style="flex: 1;"><a href="javascript:;" style="color: #da6792;" onclick="customerRecharge('${item.id}','${item.dealStatus}')">结账</a></span>
        </div>
    </div>
    <script>
        function customerRecharge(id,dealStatus) {
            var auditswitch=$("#auditswitch").val();  //开单是否需要审批(1 需要  2 不需要)
            if(auditswitch==1 && dealStatus=='待审核'){  //需要审核
                alert("此单正在审核中，不能结账！")
                return;
            }
            $.ajax({
                url: Feng.ctxPath + "/recharge/getOpenBillData",
                type: "post",
                data: {
                "id": id
                },
                success: function (data) {
                    if(data==0){
                        alert("开单项目已更改，请联系开单人重新结账！");
                        window.location.reload();
                    }else{
                    var index = layer.open({
                        type: 2,
                        title: '结账',
                        area: ['90%', '90%'], //宽高
                        fix: true, //不固定
                        maxmin: true,
                        content: Feng.ctxPath + '/recharge/to_checkoutMethod/' +id
                        });
                    this.layerIndex = index;
                    }
                },
                error: function (data) {
                    alert('没有权限，请联系系统管理员!');
                    parent.layer.close(parent.layer.getFrameIndex(window.name));
                }
             });
        }
    </script>
    @}
</div>